<!--{include manage_header}-->
<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="coupons">
	<div class="dashboard" id="dashboard">
		<ul>${mcurrent_order('voucher')}</ul>
	</div>
    <div id="content" class="coupons-box clear mainwide">
		<div class="box clear">
            <div class="box-top"></div>
            <div class="box-content">
                <div class="head">
                    <h2>Voucher Serial</h2>
				</div>
				<div class="sect" style="padding:0 10px;">
					<form method="get">
					Order code# <input style="font-size: 15px;" type="text" name="ordercode" class="h-input" value="{$_GET['ordercode']}" >
					Serial <input style="font-size: 15px;"  type="text" name="serial" class="h-input" value="{$_GET['serial']}" >
					Paying time from <input style="font-size: 15px;" type="text" class="h-input" onFocus="WdatePicker({isShowClear:false,readOnly:true})" name="pbday" value="{$pbday}" /> to <input style="font-size: 15px;" type="text" class="h-input" onFocus="WdatePicker({isShowClear:false,readOnly:true})" name="peday" value="{$peday}" />
					Status 
					<select name="status">
						<option value=0>...</option>
						<option value=1>All</option>
						<option value=2>Used</option>
						<option value=3>Unused</option>
						<option value=4>Canced</option>
					</select><br>
						<p style="margin:5px 0;">
							<input type="submit" value="select" class="formbutton"  style="padding:1px 6px;"/>
							<input type="reset" onclick="location.href='index.php'" id="resetform" value="Reset" class="formbutton"  style="padding:1px 6px;"/>
						</p>
					<form>
				</div>
                <div class="sect">
                <h2>We have {$count} voucher serial - <a href="{$_SERVER['PHP_SELF']}?action=download">Download List</a></h2>
					<table id="orders-list" cellspacing="0" cellpadding="0" border="0" class="coupons-table" width="98%">
					<tr class="forum_title_tr"><th width="40">###</th><th width="100px">User</th><th width="50">Order Code #</th><th width="40" nowrap>Serial</th><th width="50" nowrap>Date</th><th width="100px">Action</th></tr>
					<!--{loop $voucher $index $one}-->
					<tr ${$index%2?'':'class="alt"'} id="order-list-id-{$one['id']}">
						<td>{$one['id']}</td>
						<td>{$user[$one['user_id']]['email']}<br>{$user[$one['user_id']]['realname']}</td>
						<td>{$order_code[$one['order_id']]['code']}</td>
						<td><!--{if ($one['istatus']==2)}--><b style="text-decoration: line-through;color:red;">{$one['serial']}</b><!--{else}--><b style="font-size: 15px;color: green;">{$one['serial']}</b><!--{/if}--></td>
						<td>${date('d-m-Y',$one['create_date'])}</td>
						<td><!--{if ($one['iused']==1 && $one['istatus']!=2)}--><a style="font-size: 20px" href="#" class="ajaxlink" ask="Ples login as Partner ID to set used for this voucher?">Unused</a><!--{else if ($one['istatus']!=1)}--><b style="font-size: 20px;color:red">Canced</b><!--{else}--><b style="font-size: 20px;color:green">Used</b><!--{/if}--></td>
					</tr>
					<!--{/loop}-->
					<tr><td colspan="7">{$pagestring}</tr>
                    </table>
				</div>
            </div>
            <div class="box-bottom"></div>
        </div>
    </div>
</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->

<!--{include manage_footer}-->
